Integrand size = 21, antiderivative size = 21 \[ \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx=\frac {\sqrt {2} (a+b) \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-1-n,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right ) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \tan (c+d x)}{b d \sqrt {1+\sec (c+d x)}}-\frac {\sqrt {2} a \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right ) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \tan (c+d x)}{b d \sqrt {1+\sec (c+d x)}}-\text {Int}\left ((a+b \sec (c+d x))^n,x\right ) \]
(a+b)*AppellF1(1/2,-1-n,1/2,3/2,b*(1-sec(d*x+c))/(a+b),1/2-1/2*sec(d*x+c)) *(a+b*sec(d*x+c))^n*2^(1/2)*tan(d*x+c)/b/d/(((a+b*sec(d*x+c))/(a+b))^n)/(1 +sec(d*x+c))^(1/2)-a*AppellF1(1/2,-n,1/2,3/2,b*(1-sec(d*x+c))/(a+b),1/2-1/ 2*sec(d*x+c))*(a+b*sec(d*x+c))^n*2^(1/2)*tan(d*x+c)/b/d/(((a+b*sec(d*x+c)) /(a+b))^n)/(1+sec(d*x+c))^(1/2)-Unintegrable((a+b*sec(d*x+c))^n,x)
Not integrable
Time = 12.26 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.10 \[ \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx=\int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx \]
Not integrable
Time = 0.96 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {3042, 4382, 3042, 4551, 25, 3042, 4321, 156, 155, 4412, 3042, 4273, 4321, 156, 155}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^2(c+d x) (a+b \sec (c+d x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cot \left (c+d x+\frac {\pi }{2}\right )^2 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^ndx\) |
\(\Big \downarrow \) 4382 |
\(\displaystyle \int \left (\sec ^2(c+d x)-1\right ) (a+b \sec (c+d x))^ndx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (\csc \left (c+d x+\frac {\pi }{2}\right )^2-1\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^ndx\) |
\(\Big \downarrow \) 4551 |
\(\displaystyle \frac {\int -\left ((b+a \sec (c+d x)) (a+b \sec (c+d x))^n\right )dx}{b}+\frac {\int \sec (c+d x) (a+b \sec (c+d x))^{n+1}dx}{b}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \sec (c+d x) (a+b \sec (c+d x))^{n+1}dx}{b}-\frac {\int (b+a \sec (c+d x)) (a+b \sec (c+d x))^ndx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{n+1}dx}{b}-\frac {\int \left (b+a \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^ndx}{b}\) |
\(\Big \downarrow \) 4321 |
\(\displaystyle -\frac {\int \left (b+a \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^ndx}{b}-\frac {\tan (c+d x) \int \frac {(a+b \sec (c+d x))^{n+1}}{\sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}d\sec (c+d x)}{b d \sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}\) |
\(\Big \downarrow \) 156 |
\(\displaystyle -\frac {\int \left (b+a \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^ndx}{b}-\frac {(a+b) \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \int \frac {\left (\frac {a}{a+b}+\frac {b \sec (c+d x)}{a+b}\right )^{n+1}}{\sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}d\sec (c+d x)}{b d \sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}\) |
\(\Big \downarrow \) 155 |
\(\displaystyle \frac {\sqrt {2} (a+b) \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n-1,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt {\sec (c+d x)+1}}-\frac {\int \left (b+a \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^ndx}{b}\) |
\(\Big \downarrow \) 4412 |
\(\displaystyle \frac {\sqrt {2} (a+b) \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n-1,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt {\sec (c+d x)+1}}-\frac {b \int (a+b \sec (c+d x))^ndx+a \int \sec (c+d x) (a+b \sec (c+d x))^ndx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sqrt {2} (a+b) \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n-1,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt {\sec (c+d x)+1}}-\frac {b \int \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^ndx+a \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^ndx}{b}\) |
\(\Big \downarrow \) 4273 |
\(\displaystyle \frac {\sqrt {2} (a+b) \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n-1,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt {\sec (c+d x)+1}}-\frac {a \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^ndx+b \int (a+b \sec (c+d x))^ndx}{b}\) |
\(\Big \downarrow \) 4321 |
\(\displaystyle \frac {\sqrt {2} (a+b) \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n-1,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt {\sec (c+d x)+1}}-\frac {b \int (a+b \sec (c+d x))^ndx-\frac {a \tan (c+d x) \int \frac {(a+b \sec (c+d x))^n}{\sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}d\sec (c+d x)}{d \sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}}{b}\) |
\(\Big \downarrow \) 156 |
\(\displaystyle \frac {\sqrt {2} (a+b) \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n-1,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt {\sec (c+d x)+1}}-\frac {b \int (a+b \sec (c+d x))^ndx-\frac {a \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \int \frac {\left (\frac {a}{a+b}+\frac {b \sec (c+d x)}{a+b}\right )^n}{\sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}d\sec (c+d x)}{d \sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1}}}{b}\) |
\(\Big \downarrow \) 155 |
\(\displaystyle \frac {\sqrt {2} (a+b) \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n-1,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt {\sec (c+d x)+1}}-\frac {b \int (a+b \sec (c+d x))^ndx+\frac {\sqrt {2} a \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{d \sqrt {\sec (c+d x)+1}}}{b}\) |
3.4.59.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) ^(p_), x_] :> Simp[((a + b*x)^(m + 1)/(b*(m + 1)*Simplify[b/(b*c - a*d)]^n* Simplify[b/(b*e - a*f)]^p))*AppellF1[m + 1, -n, -p, m + 2, (-d)*((a + b*x)/ (b*c - a*d)), (-f)*((a + b*x)/(b*e - a*f))], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && !IntegerQ[m] && !IntegerQ[n] && !IntegerQ[p] && GtQ[Sim plify[b/(b*c - a*d)], 0] && GtQ[Simplify[b/(b*e - a*f)], 0] && !(GtQ[Simpl ify[d/(d*a - c*b)], 0] && GtQ[Simplify[d/(d*e - c*f)], 0] && SimplerQ[c + d *x, a + b*x]) && !(GtQ[Simplify[f/(f*a - e*b)], 0] && GtQ[Simplify[f/(f*c - e*d)], 0] && SimplerQ[e + f*x, a + b*x])
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) ^(p_), x_] :> Simp[(e + f*x)^FracPart[p]/(Simplify[b/(b*e - a*f)]^IntPart[p ]*(b*((e + f*x)/(b*e - a*f)))^FracPart[p]) Int[(a + b*x)^m*(c + d*x)^n*Si mp[b*(e/(b*e - a*f)) + b*f*(x/(b*e - a*f)), x]^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && !IntegerQ[m] && !IntegerQ[n] && !IntegerQ[p] & & GtQ[Simplify[b/(b*c - a*d)], 0] && !GtQ[Simplify[b/(b*e - a*f)], 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Unintegrable[ (a + b*Csc[c + d*x])^n, x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[a^2 - b^2, 0 ] && !IntegerQ[2*n]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_ Symbol] :> Simp[Cot[e + f*x]/(f*Sqrt[1 + Csc[e + f*x]]*Sqrt[1 - Csc[e + f*x ]]) Subst[Int[(a + b*x)^m/(Sqrt[1 + x]*Sqrt[1 - x]), x], x, Csc[e + f*x]] , x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b^2, 0] && !IntegerQ[2*m]
Int[cot[(c_.) + (d_.)*(x_)]^2*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Int[(-1 + Csc[c + d*x]^2)*(a + b*Csc[c + d*x])^n, x] /; FreeQ[ {a, b, c, d, n}, x] && NeQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d _.) + (c_)), x_Symbol] :> Simp[c Int[(a + b*Csc[e + f*x])^m, x], x] + Sim p[d Int[(a + b*Csc[e + f*x])^m*Csc[e + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && !IntegerQ[2*m]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_. ) + (a_))^(m_), x_Symbol] :> Simp[1/b Int[(a + b*Csc[e + f*x])^m*(A*b - a *C*Csc[e + f*x]), x], x] + Simp[C/b Int[Csc[e + f*x]*(a + b*Csc[e + f*x]) ^(m + 1), x], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && NeQ[a^2 - b^2, 0] && !IntegerQ[2*m]
Not integrable
Time = 0.98 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00
\[\int \left (a +b \sec \left (d x +c \right )\right )^{n} \tan \left (d x +c \right )^{2}d x\]
Not integrable
Time = 0.27 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.10 \[ \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{2} \,d x } \]
Not integrable
Time = 3.98 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.95 \[ \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{n} \tan ^{2}{\left (c + d x \right )}\, dx \]
Not integrable
Time = 5.80 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.10 \[ \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{2} \,d x } \]
Not integrable
Time = 0.71 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.10 \[ \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{2} \,d x } \]
Not integrable
Time = 15.07 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.19 \[ \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx=\int {\mathrm {tan}\left (c+d\,x\right )}^2\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \]